import Vue from 'vue'
import VueRouter from 'vue-router'
// import { component } from 'vue/types/umd'
import HomeView from '../views/home/HomeView.vue'
import Layout from '../views/Layout.vue'

Vue.use(VueRouter)

const routes = [
  {
   path:'/',
   component:Layout,
  //  children:[
  //   {
  //     path: '/',
  //     name: 'home',
  //     component: HomeView
  //   },
  //   {
  //     path:'/guowai',
  //     component:()=>import('../views/guowai/index.vue')   //懒加载写法
  //   }
  //  ]
  }
]

const router = new VueRouter({
  mode:'history',
  base:process.env.BASE_URL,
  routes
})

export default router
